home *** CD-ROM | disk | FTP | other *** search
/ Elite College Girls 1 / Elite College Girls - Volume 1.iso / pc / shared.dir / 01951.ls < prev    next >
Encoding:
Text File  |  1996-02-02  |  5.0 KB  |  190 lines

  1. global gProjectorInUse, gPhotos, gCurrentGroup, gCurrentGroupPICTlist, gCurrentPict, gFixPal, gPictSprite, gCenterH, gCenterV, gZoomDirection, gInterfaceSprite
  2.  
  3. on startMovie
  4.   if the machineType <> 256 then
  5.     if voidp(gFixPal) then
  6.       openXLib("WRONGPAL.XOB")
  7.       set gFixPal to FixPalette(mnew, the stageLeft, the stageTop, the stageRight, the stageTop)
  8.     end if
  9.   end if
  10.   if the movie contains "Photos.DIR" then
  11.     cursor(4)
  12.     setGPhoto()
  13.     activate(47, "Interface", 1, 0, 320, 454, EMPTY, EMPTY, EMPTY)
  14.     prepImage()
  15.     cursor(-1)
  16.     when mouseDown then checkClick
  17.   else
  18.     if gProjectorInUse < 1 then
  19.       set the centerStage to 1
  20.       if the colorDepth < 8 then
  21.         set the colorDepth to 8
  22.         if the colorDepth < 8 then
  23.           set x to "Excuse me, but this program requires at least 256 colors to run properly."
  24.           set x to x & RETURN & RETURN & "Please change your monitor configurations, and try again."
  25.           alert(x)
  26.           if not (the shiftDown) then
  27.             halt()
  28.             exit
  29.           end if
  30.         end if
  31.       end if
  32.       if the machineType <> 256 then
  33.       end if
  34.       set gProjectorInUse to 1
  35.     end if
  36.     set the itemDelimiter to ","
  37.     when mouseDown then nothing
  38.   end if
  39.   when keyDown then checkKey
  40. end
  41.  
  42. on prepImage
  43.   setGlobals()
  44.   showImage()
  45.   setDimensions()
  46. end
  47.  
  48. on patchpal
  49.   if the machineType <> 256 then
  50.     gFixPal(mPatchIt)
  51.   end if
  52. end
  53.  
  54. on getWhichPICT
  55.   set gCurrentGroupPICTlist to getAt(gPhotos, gCurrentGroup)
  56.   set gCurrentPict to checkRangeWrap(gCurrentPict, 2, count(gCurrentGroupPICTlist))
  57.   set whichPICT to getAt(gCurrentGroupPICTlist, gCurrentPict)
  58.   return whichPICT
  59. end
  60.  
  61. on getNextPICT
  62.   set gCurrentGroupPICTlist to getAt(gPhotos, gCurrentGroup)
  63.   set whichPICT to checkRangeWrap(gCurrentPict + 1, 2, count(gCurrentGroupPICTlist))
  64.   set whichPICT to getAt(gCurrentGroupPICTlist, whichPICT)
  65.   return whichPICT
  66. end
  67.  
  68. on getPreviousPICT
  69.   set gCurrentGroupPICTlist to getAt(gPhotos, gCurrentGroup)
  70.   set whichPICT to checkRangeWrap(gCurrentPict - 1, 2, count(gCurrentGroupPICTlist))
  71.   set whichPICT to getAt(gCurrentGroupPICTlist, whichPICT)
  72.   return whichPICT
  73. end
  74.  
  75. on showImage
  76.   set whichPICT to getWhichPICT()
  77.   superPalette(whichPICT)
  78.   set theRectWidth to the width of cast whichPICT / 2
  79.   set theRectHeight to the height of cast whichPICT / 2
  80.   set theRectLeft to 320 - (theRectWidth / 2)
  81.   set theRectTop to 240 - (theRectHeight / 2)
  82.   activate(1, whichPICT, 1, 0, theRectLeft, theRectTop, "stretch to:", theRectLeft + theRectWidth, theRectTop + theRectHeight)
  83.   puppetTransition(1, 0, 5)
  84.   updateStage()
  85.   go(the frame)
  86.   set whichPICT to getNextPICT()
  87.   preLoad(whichPICT)
  88.   set whichPICT to getPreviousPICT()
  89.   preLoad(whichPICT)
  90. end
  91.  
  92. on advanceImage
  93.   deactivate([1])
  94.   puppetTransition(1, 0, 4)
  95.   updateStage()
  96.   showImage()
  97.   when mouseDown then checkClick
  98. end
  99.  
  100. on superPalette whichPICT
  101.   deactivate([1])
  102.   puppetTransition(5, 0, 12)
  103.   updateStage()
  104.   doPalette(the palette of cast whichPICT)
  105.   patchpal()
  106.   go(the frame)
  107. end
  108.  
  109. on doPalette whichPalette
  110.   puppetPalette(whichPalette)
  111.   updateStage()
  112. end
  113.  
  114. on checkClick
  115.   if the mouseV < the top of sprite gInterfaceSprite then
  116.     if the optionDown then
  117.       zoomSprite(gPictSprite, the clickLoc, the locH of sprite gPictSprite, the locV of sprite gPictSprite, -1)
  118.     else
  119.       zoomSprite(gPictSprite, the clickLoc, the locH of sprite gPictSprite, the locV of sprite gPictSprite, 1)
  120.     end if
  121.     startTimer()
  122.   else
  123.     checkInterfaceClick(the mouseH)
  124.   end if
  125. end
  126.  
  127. on checkKey
  128.   set userKey to the key
  129.   set userKeyCode to the keyCode
  130.   if developersKey() then
  131.     if userKey = "8" then
  132.       set the colorDepth to 8
  133.     else
  134.       if userKey = "6" then
  135.         set the colorDepth to 16
  136.       end if
  137.     end if
  138.     exit
  139.   else
  140.     if commandKey() then
  141.       if userKey = "Q" then
  142.         pass()
  143.         halt()
  144.       else
  145.         pass()
  146.         exit
  147.       end if
  148.     else
  149.       if userKeyCode = 27 then
  150.         halt()
  151.       else
  152.         if (userKey = "?") or (userKey = "/") then
  153.           exit
  154.         else
  155.           if userKey = "S" then
  156.             set the soundEnabled to not (the soundEnabled)
  157.             exit
  158.           else
  159.             if (userKey >= "0") and (userKey <= "9") then
  160.               set the soundEnabled to 1
  161.               set the soundLevel to value(userKey)
  162.               set newVolume to value(userKey) * 28
  163.               set the volume of sound 1 to newVolume
  164.               set the volume of sound 2 to newVolume
  165.               exit
  166.             else
  167.               if userKeyCode = 29 then
  168.                 exit
  169.               else
  170.                 if userKeyCode = 28 then
  171.                   exit
  172.                 else
  173.                   if userKeyCode = 30 then
  174.                     exit
  175.                   else
  176.                     if userKeyCode = 31 then
  177.                       exit
  178.                     end if
  179.                   end if
  180.                 end if
  181.               end if
  182.             end if
  183.           end if
  184.         end if
  185.       end if
  186.     end if
  187.   end if
  188.   dontPassEvent()
  189. end
  190.